/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Domain;

/**
 *
 * @author Min0
 */
enum InstructorType
{
    Tennis,
    Badminton,
    Golf,
    Swimming,   
}

public class Instructor extends Person {
    
    private InstructorType Type;
    private float PricePerHour;
    
    public Instructor()
    {
    }
    
    public Instructor(InstructorType type, String Name, String Address, String Country, String PhoneNo,String Email, String LoginID)
    {
        super(Name, Address, Country, PhoneNo, Email, LoginID);
        
        Type = type;
        //based on type we assing its price automatically
        switch(type)
        {
            case Badminton:
                PricePerHour = 30;
                break;
            case Golf:
                PricePerHour = 40;
                break;
            case Swimming:
                PricePerHour = 40;
                break;
            case Tennis:
                PricePerHour = 30;
                break;
            default:
                break;
        }
    }

    /**
     * @return the Type
     */
    public String getType() {
        return Type.name();
    }

    /**
     * @param Type the Type to set
     */
    public void setType(String Type) {
        for(InstructorType e : InstructorType.values())
        {
            if(e.name().equals(Type))
            {
                this.Type = e;
            }
        }
    }

    /**
     * @return the PricePerHour
     */
    public float getPricePerHour() {
        return PricePerHour;
    }

    /**
     * @param PricePerHour the PricePerHour to set
     */
    public void setPricePerHour(float PricePerHour) {
        this.PricePerHour = PricePerHour;
    }
}
